﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Notification="clr-namespace:Mantin.Controls.Wpf.Notification;assembly=Mantin.Controls.Wpf.Notification" x:Class="TestApplication.MainWindow"
    Title="Toast Popup/Help Balloon Sample Application" SizeToContent="Height" Width="525" WindowStartupLocation="CenterScreen"
    Background="LightGray" ResizeMode="NoResize">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Grid.Resources>
            <Style TargetType="Label">
                <Setter Property="HorizontalAlignment" Value="Center"/>
                <Setter Property="FontSize" Value="18"/>
                <Setter Property="FontWeight" Value="Bold"/>
            </Style>
        </Grid.Resources>

        <Label Grid.Column="0" Grid.Row="0">Toast Popup</Label>

        <StackPanel Orientation="Vertical" Grid.Column="0" Grid.Row="1" Margin="10">
            <TextBlock Text="Title"/>
            <TextBox Text="{Binding Title}"/>

            <TextBlock Text="Text"/>
            <TextBox TextWrapping="WrapWithOverflow" 
                     Height="80"
                     AcceptsReturn="True"
                     ScrollViewer.VerticalScrollBarVisibility="Auto"
                     Text="{Binding Text}"/>

            <TextBlock Text="Hyper link Text"/>
            <TextBox Text="{Binding HyperlinkText}"/>

            <TextBlock Text="Type"/>
            <ComboBox ItemsSource="{Binding NotificationTypeList}"
                      SelectedItem="{Binding SelectedNotificationType}"
                      DisplayMemberPath="Description"
                      SelectedIndex="0"
                      SelectedValuePath="Value"/>

            <Button Content="Pop Toast" 
                    Margin="0,10,0,0" 
                    Command="{Binding PopToastCommand}"
                    Width="100" 
                    HorizontalAlignment="Right"/>
        </StackPanel>

        <Label Grid.Column="1" Grid.Row="0">Help Balloon</Label>
        <StackPanel Grid.Column="1" 
                    Grid.Row="1"
                    Orientation="Vertical" 
                    Margin="10">
            <TextBlock Text="Help Caption Text"/>
            <TextBox TextWrapping="WrapWithOverflow" 
                     AcceptsReturn="True" 
                     Height="80" 
                     ScrollViewer.VerticalScrollBarVisibility="Auto"
                     Text="{Binding HelpText, UpdateSourceTrigger=PropertyChanged}"/>

            <Notification:HelpBalloon Margin="0,20,0,0" Caption="{Binding HelpText}"/>
        </StackPanel>

    </Grid>
</Window>
